<!--
 * @Author         : yanyongyu
 * @Date           : 2022-09-26 06:16:39
 * @LastEditors    : yanyongyu
 * @LastEditTime   : 2022-10-06 03:57:26
 * @Description    : None
 * @GitHub         : https://github.com/yanyongyu
-->

{% from "icons/cross-reference.html.jinja" import octicon_cross_reference %}

{% macro referenced(event, ns) %}
<div class="TimelineItem">
  <div class="TimelineItem-badge">
    {{ octicon_cross_reference() }}
  </div>
  <div class="TimelineItem-body">
    <div class="d-flex flex-auto">
      <div class="flex-auto pr-1 min-width-0">
        <a>
          <img class="avatar avatar-user" height="20" width="20" src="{{ event.actor.avatar_url }}" />
        </a>
        <a class="author Link--primary text-bold">
          {{ event.actor.login|escape }}
        </a>
        pushed a commit that referenced this
        {% if ns.issue.pull_request %}
        pull request
        {% else %}
        issue
        {% endif %}
        <a class="Link--secondary">{{ event.created_at|relative_time }}</a>
      </div>
      <div class="text-right ml-1">
        <code>
          <a class="Link--secondary">{{ event.commit_id[:7] }}</a>
        </code>
      </div>
    </div>
  </div>
</div>
{% endmacro %}
